<?php 
	include("db_fns.php");
?>

<html>
<head> 
<title> welcome to goods online </title>
</head>
<body>

<?php 
 include("../include_htmls/header.php");   						//复用页面的头部
?>

<div id ="categories">
<table border=0>

<?php 
	/**
	 * 下边显示所有的分类的商品,首先从数据库中读取出商品的种类，然后以超链接的形式显示出来
	 */
	//session_start();
	$types = getCategories(-1);
	
	$typeno = count($types);
	
	for($i = 0 ; $i < $typeno ; $i++)
	{	
		$typeid = $types[$i];
		$typename = get_typename($typeid);
		
		/**
		 * 跳转到每个分类，产看具体的商品
		 */
		
		?>
		
		 <tr> <td><a href="http://localhost/e-commerce/cart/goodsintype.php?typeid=<?=$typeid?>" > <?=$typename ?> </a></td></tr>
	<?php }?>
	
	

</table>
 
</div>
</body>
</html>